--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit 0e096d83e2d319d5a41b14d58b9d1d49944f445d
Parents : cb50825
Author : Ivan <ivan@quad4.io>
Signature : Invalid signer <e46112d44649266d71fe2193e00a4710>, author is <ivan@quad4.io>
Date : 2026-07-13T09:51:32-05:00
refactor: streamline emulator smoke script execution in CI workflow
Changes
2 files changed, 10 insertions(+), 6 deletions(-)
Diff
diff --git a/.github/workflows/android-emulator-smoke.yml b/.github/workflows/android-emulator-smoke.yml
index f24c5f48..7cd308ed 100644
--- a/.github/workflows/android-emulator-smoke.yml
+++ b/.github/workflows/android-emulator-smoke.yml
@@ -183,6 +183,9 @@ jobs:
if-no-files-found: error
retention-days: 7
+ # android-emulator-runner runs each script line via `sh -c` (dash on
+ # Ubuntu). Keep this a single POSIX line and put bashisms in the
+ # smoke script (shebang + set -euo pipefail).
- name: Run emulator smoke
uses: reactivecircus/android-emulator-runner@a421e43855164a8197daf9d8d40fe71c6996bb0d # v2.38.0
with:
@@ -193,9 +196,4 @@ jobs:
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
- script: |
- set -euo pipefail
- APK="$(ls -1 android/app/build/outputs/apk/debug/*.apk | head -n 1)"
- echo "Using APK: ${APK}"
- chmod +x scripts/ci/android-emulator-smoke.sh
- MESHCHATX_SMOKE_TIMEOUT_SEC=180 bash scripts/ci/android-emulator-smoke.sh "${APK}"
+ script: MESHCHATX_SMOKE_TIMEOUT_SEC=180 bash scripts/ci/android-emulator-smoke.sh "$(ls -1 android/app/build/outputs/apk/debug/*.apk | head -n 1)"
diff --git a/tests/test_android_emulator_smoke_script.py b/tests/test_android_emulator_smoke_script.py
index db130600..0ce4c86a 100644
--- a/tests/test_android_emulator_smoke_script.py
+++ b/tests/test_android_emulator_smoke_script.py
@@ -40,3 +40,9 @@ def test_workflow_references_smoke_script():
assert "reactivecircus/android-emulator-runner@" in workflow
assert "MESHCHATX_ABIS" in workflow
assert "x86_64" in workflow
+ # Runner executes each script: line with /usr/bin/sh (dash). A bare
+ # `set -euo pipefail` there fails with "Illegal option -o pipefail".
+ smoke_step = workflow.split("name: Run emulator smoke", 1)[1]
+ smoke_script = smoke_step.split("script:", 1)[1].split("\n", 1)[0]
+ assert "bash scripts/ci/android-emulator-smoke.sh" in smoke_script
+ assert "set -euo pipefail" not in smoke_script
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────